package com.ruoyi.feign.controller;

import com.ruoyi.feign.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 消息控制器
 */
@RestController
@RequestMapping("/feign")
public class MessageController {

    @Autowired
    private MessageService messageService;

    /**
     * 获取消息
     */
    @GetMapping("/getMessage/{name}")
    public String getMessage(@PathVariable("name") String name) {
        return messageService.getMessage(name);
    }
}
